package com.lebang.medicalInquiry.service;

import com.lebang.medicalInquiry.mapper.OffLineNoticeMapper;
import com.lebang.medicalInquiry.model.po.OffLineNotice;
import com.lebang.medicalInquiry.model.vo.PageVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NoticeService {

    @Resource
    private OffLineNoticeMapper offLineNoticeMapper;

    public PageVo<List<OffLineNotice>> getOffLineNotice(String uuid, String chatUuid, Integer page, Integer limit) {
        return new PageVo<List<OffLineNotice>>(offLineNoticeMapper.getListByCondition(uuid,chatUuid,(page-1)*limit,limit),offLineNoticeMapper.countByCondition(uuid,chatUuid));
    }
}
